<div align="center">
<table class="fTable" align="center">
	<tr>
		<th colspan="6">Prescriptions <%
			if (ov.getPrescriptions().size() == 0) {
		%> (No Records)</th>
	</tr>
	<%
		} else {
	%>
	<tr class="subHeader">
		<td>Medication</td>
		<td>Dosage (mg)</td>
		<td>Dates</td>
		<td colspan="2">Instructions</td>
		<td style="width: 60px;">Action</td>
	</tr>
	<%
		for (PrescriptionBean pres : ov.getPrescriptions()) {
	%>
	<tr>
		<td align="center"><a
			href='./editPrescription.jsp?presID=<%=StringEscapeUtils.escapeHtml("" 
							+ (pres.getId()))%>&amp;ovID=<%=StringEscapeUtils.escapeHtml("" + (ovIDString))%>'><%=StringEscapeUtils.escapeHtml(""
							+ (pres.getMedication().getDescription()))%> (<%=StringEscapeUtils.escapeHtml(""
							+ (pres.getMedication().getNDCode()))%>)</a></td>
		<td align="center"><%=StringEscapeUtils.escapeHtml(""
							+ (pres.getDosage()))%></td>
		<td align="center"><%=StringEscapeUtils.escapeHtml(""
							+ (pres.getStartDateStr()))%> - <%=StringEscapeUtils.escapeHtml(""
							+ (pres.getEndDateStr()))%></td>
		<td align="center" colspan="2"><%=StringEscapeUtils.escapeHtml(""
							+ (pres.getInstructions()))%></td>
		<td align="center"><a href="javascript:removeID('removeMedID','<%=StringEscapeUtils.escapeHtml("" + (pres.getId()))%>');">Remove</a></td>
	</tr>
	<tr>
		<td>&nbsp;</td>
	</tr>
	<%
		}
		}
	%>
	<tr>
		<td align="center"><select name="addMedID" id="addMedID">
			<option value="">-- Please Select a Medication --</option>
			<%
				for (MedicationBean med : prodDAO.getNDCodesDAO().getAllNDCodes()) {
			%>
			<option value="<%=med.getNDCode()%>"><%=StringEscapeUtils.escapeHtml("" + (med.getNDCode()))%>
			- <%=StringEscapeUtils.escapeHtml(""
						+ (med.getDescription()))%></option>

			<%
				}
			%>
		</select></td>
		<td align="center"><input type="text" name="dosage" id="dosage"
			value="Dosage (mg)" onFocus="if(this.value == 'Dosage (mg)') {this.value = '';}" 
			onBlur="if (this.value == '') {this.value = 'Dosage (mg)';}" 
			maxlength="6" style="width: 80px;"></td>
		<td align="center" colspan="2"><input type="text"
			name="startDate" id="startDate" style="width: 80px;"
			onclick="displayDatePicker('startDate');"
			onselect="displayDatePicker('startDate');"
			value='<%=StringEscapeUtils.escapeHtml(""
					+ (new SimpleDateFormat("MM/dd/yyyy").format(new Date())))%>'>
		to <input type="text" name="endDate" id="endDate" style="width: 80px;"
			onclick="displayDatePicker('endDate');"
			onselect="displayDatePicker('endDate');"
			value='<%=StringEscapeUtils.escapeHtml(""
					+ (new SimpleDateFormat("MM/dd/yyyy").format(new Date())))%>'>
		</td>
		<td align="center"><input type="text" name="instructions"
			value="-- Instructions --" onFocus="if(this.value == '-- Instructions --') {this.value = '';}" 
			onBlur="if (this.value == '') {this.value = '-- Instructions --';}"
			id="instructions" maxlength="500"></td>
		<td><input type="button" id="addprescription" onclick="setVar()"
			value="Add Prescription"></td>
	</tr>
</table>
<%
	if (!("".equals(warning))) {
%> <br />
<div style="background-color: yellow; color: black" align="center"><%=StringEscapeUtils.escapeHtml("" + (warning))%></div>
<div style="background-color: yellow"><select multiple
	name="overrideReasonCode"
	title="To select multiple reasons use Control+Click. (Or if on a Mac, Command+Click)"
	id="overrideReasonCode" style="font-size: 10px;">
	<%
		for (OverrideReasonBean bean : prodDAO.getORCodesDAO()
					.getAllORCodes()) {
	%>
	<option value="<%=bean.getORCode()%>"><%=StringEscapeUtils.escapeHtml(""
							+ (bean.getORCode()))%> - <%=StringEscapeUtils.escapeHtml(""
							+ (bean.getDescription()))%></option>

	<%
		}
	%>
</select></div>
<div style="background-color: yellow">Other reasons:<br />
<textarea name="overrideComment" id="overrideComment" ROWS="5" COLS="40"
	" maxlength="210""></textarea></div>
<div style="background-color: yellow" align="center"><input
	type="button" onclick="presCont()" value="Continue" name="continue"
	id="continue" /> <input type="button"
	onclick="location.href='/iTrust/auth/hcp-uap/editOfficeVisit.jsp'"
	value="Cancel" name="cancel" id="cancel" /></div>
<BR>

<%
	}
	;
%>
</div>